package com.atguigui.leetcode;

/**
 * 1832.判断句子是否为全字母句
 * Project: leetcode
 * Package: com.atguigui.leetcode
 * Version: 1.0
 * <p>
 * Created by WJX on 2022/12/13 8:50
 */
public class P1832CheckIfTheSentenceIsPangram {
    public static void main(String[] args) {
        Solution solution = new P1832CheckIfTheSentenceIsPangram().new Solution();
        // TO TEST
    }

    class Solution {
        public boolean checkIfPangram(String sentence) {

            int[] ans = new int[26];
            for (int i = 0; i < sentence.length(); i++) {
                ans[sentence.charAt(i) - 'a']++;
            }

            for (int an : ans) {
                if (an == 0) {
                    return false;
                }
            }

            return true;
        }
    }
}
